state_quiz : state_quiz.o cmd_line_ui.o quiz_lib.o get_question_and_answer.o
	gcc -lm -o state_quiz state_quiz.o cmd_line_ui.o quiz_lib.o get_question_and_answer.o

state_quiz.o : state_quiz.c
	gcc -Wall -c -g  state_quiz.c

cmd_line_ui.o : cmd_line_ui.c
	gcc -Wall -c -g cmd_line_ui.c

quiz_lib.o : quiz_lib.c get_question_and_answer.c
	gcc -Wall -c -g quiz_lib.c

get_question_and_answer.o : get_question_and_answer.c
	gcc -Wall -c -g get_question_and_answer.c

clean:
	rm *.o
	rm state_quiz
